using Godot;
using System;

public partial class Bank : MarginContainer
{
    [Export] public int startingGold = 150;

    private Label label;
    private int _currGold;

    public int CurrGold
    {
        get => _currGold;
        set
        {
            _currGold = Math.Max(value, 0);
            label.Text = $"金币：{_currGold}";
        }
    }

    public override void _Ready()
    {
        label = GetNode<Label>("Label");
        CurrGold = startingGold;
    }

    public override void _Process(double delta)
    {
    }
}